package com.evil.kingdom.repository.alliance;

import com.evil.kingdom.pojo.entity.alliance.Alliance;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.Collection;
import java.util.List;

/**
 * 结盟
 *
 * @author liyang
 * @date 2024-05-22 16:41
 */
public interface AllianceRepository extends MongoRepository<Alliance, String> {

    @Query("{ 'belongs' : { $all : ?0 } }")
    List<Alliance> existsAllianceByBelongs(Collection<String> belongs);
}
